\section{Beamer}

The \href{https://ctan.org/pkg/beamer}{beamer} package is used to make presentation slides. It's actually a special type of document class, so we will need to replace \texttt{article} with \texttt{beamer} in the \texttt{documentclass} declaration in the preamble. You will still need to create a \texttt{document} structure and put your presentation inside of it.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-13-1}}
\end{center}

The basic structure of a beamer document is the \texttt{frame} environment. A frame may consist of one or more slides. We'll see how one frame leads to many slides later. We'll start with a basic frame with just a little bit of text.

Once you have your frame, you can create a \verb|\frametitle{}|. This is text that will appear at the top of all of the slides in your frame.

You might notice on the bottom right that there are some symbols. These are navigation symbols that you can use to move forward and backwards through your slide deck. If you wanted to get rid of that, use put \verb|\beamertemplatenavigationsymbolempty| in the preamble.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-13-2}}
\end{center}

Everything else you want to put into your slide can be done the same way you would put it into an article. The text you type will appear on the slide. You can also have equations, itemized and enumerated lists, tables, imported graphics, and \TikZ\ images.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-13-3}}
\end{center}

If you wanted to have multiple columns of text on your slide, you can use the \texttt{columns} environment. To start each column, you will need to make a \verb|\column| declaration and specify the width of the column. It usually makes sense to define this width relative to the \verb|\linewidth|. For example, if you want to make two columns, you can choose your column widths to be \verb|0.5\linewidth|, but you can define those widths to be whatever you want.

The environment will automatically create a bit of padding so that there's a space between the columns and balance that spacing horizontally. Technically, that bit of padding will make it so that if you have two columns at \verb|0.5\linewidth|, the edges of text will be slightly outside of the standard page width. We'll come back to that in a moment. Notice that the column environment will also vertically center each column. It does not matter whether one column is longer than the other, each one will be vertically centered.

You can also put text both above and below the columns if you wanted. You may want to use \verb|\vspace{}| to create a little bit of a vertical padding. You can also see the artifact of the padding between the columns. If it bothers you that the columns make that area wide, you can shrink the widths of your columns down to about \verb|0.45\linewidth| and that should fix things.

Since this is a presentation package, there are a few more things that we can do to enhance the presentation. One frame can be turned into multiple slides by having different parts of it appear or disappear at different times, as well as making formatting changes as you go through the slides.

\begin{center}
  \fbox{\includegraphics[width=0.75\linewidth]{img-13-4}}
\end{center}

The most basic tool for this is the \verb|\pause| command. This will display everything in the frame up to the command on one slide, and then create a second slide immediately afterwards that has the full contents. You can actually have multiple pauses and create many slides with a single frame.

\begin{center}
  \fbox{\includegraphics[width=0.55\linewidth]{img-13-5}}
\end{center}

A more sophisticated tool is to use specification overlays. These are values inside pointy brackets that indicate the slides within the frame that you want things to appear. A number by itself means that you want that feature on a single frame. A range of values means all the frames including the endpoints. A number followed by a dash means all the frames starting from the frame number and onwards. And you can use multiple instructions separated by commas.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-13-6}}
\end{center}

The most common place for this is in an \texttt{itemize} environment. With the specification overlays, we can make the bullet points appear and disappear in any order we choose. Notice that the positions of the bullet points are preserved so that they do not shift up or down as we move through the slides.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-13-7}}
\end{center}

We can also apply this to other text. We can use it to control when certain words are put in bold or italicized font, or change the color of the text. These can be used to emphasize certain words at certain moments on the slide. There are also two ways we can make text appear on the slide. We can \texttt{uncover} text that was there the whole time, or we can make text appear\texttt{only} on certain slides. Notice the unusual spacing on the \texttt{only} parameter. The reason for this is that if you put the space outside of the brackets, you will get a double space when the text is absent.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-13-8}}
\end{center}

Another structure that's useful for presentations are blocks. Blocks are a special formatting where you have a title and then text. It may not look like much now, but when we start applying themes, the blocks will placed inside of a colored box so that it stands out more. Beamer automatically loads the \texttt{amsthm} package, so we can use the \verb|\newtheorem| to create a theorem environment that also behaves like a block. We also have access to the \texttt{proof} environment as well, complete with its end of proof symbol.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-13-9}}
\end{center}

Up to this point, we've been using the default style, which is quite bland. There are both themes and color themes that you can use to make your presentation look better. There are 29 different themes and 19 different color themes that you can use. To use these, you can add one or both of these commands in the preamble. There is a \href{https://hartwork.org/beamer-theme-matrix/}{website} that shows you examples of every theme with every color theme so that you can explore your options quickly and easily. We have a short sampling here. For my class notes, I use the \texttt{boadilla} theme with the default color theme because it's minimal without being as empty as the default. Most people stick with just the predefined themes and color themes, but there are deeper layers of customization if you want to go through the documentation to learn about it.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-13-10}}
\end{center}

At the bottom right of the \texttt{boadilla} theme, you can see that there is a date and a page counter. There's actually a bit more that is happening here. In the preamble, we can set the title, author, and date. And if we do that, that information will populate the remaining boxes. That information can also feed into the \verb|\maketitle| command, which will make a title slide for your presentation.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-13-11}}
\end{center}

Different themes carry different pieces of information. We can see this if we use sections and subsections in our presentation. To see this more clearly, we will switch over to the \texttt{Berlin} theme. We can see the section labels across the top. Each subsection corresponds to a row of dots, and the number of dots is the number of frames in the subsection. These circles are clickable links, which can let you get to any page in the presentation easily.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-13-12}}
\end{center}

It's also possible to create a table of contents using the \verb|\tableofcontents| command. This has the added bonus of being able to highlight where you are in the presentation by adding in an optional parameter. If you use \verb|currentsection| then it will highlight the current section and fade everything else. If you use \verb|currentsubsection| it will highlight just the subsection. This means that you can put the table of contents in lots of places in your presentation and use it to help your audience keep track of the big picture.

As with everything else in \LaTeX, you will really start to understand beamer as you start to use it. I hope that this video has given you a foundation that you can build on as you start to create presentations using beamer.